<?php
namespace App\Params\H5;
use App\Params\Param;
/**
 * 账户充值参数
 *
 * @author: WangBin
 * @date: 2021/7/26
 * @mail: <849850352@qq.com>
 */
class AccountRechargeParams extends Param
{
    public $plan_id = 0;
    public $amount = 0;
    public $customer_id;

    public function rules()
    {
        return [
            'plan_id' => 'nullable|integer',
            'amount' => 'nullable|numeric|min:1',
            'customer_id' => 'required|integer'
        ];
    }

    /**
     * @return mixed
     */
    public function getCustomerId()
    {
        return $this->customer_id;
    }

    /**
     * @param mixed $customer_id
     */
    public function setCustomerId($customer_id): void
    {
        $this->customer_id = $customer_id;
    }

    /**
     * @return int
     */
    public function getPlanId(): int
    {
        return $this->plan_id;
    }

    /**
     * @param int $plan_id
     */
    public function setPlanId(int $plan_id): void
    {
        $this->plan_id = $plan_id;
    }

    /**
     * @return float
     */
    public function getAmount(): float
    {
        return (float)$this->amount;
    }

    /**
     * @param int $amount
     */
    public function setAmount(int $amount): void
    {
        $this->amount = $amount;
    }
}
